<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path;
%>
<script language="javascript" src="<%=basePath%>/editor/xheditor.js"
	type="text/javascript"></script>
<script language="javascript"
	src="<%=basePath%>/datePicker/WdatePicker.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
	$("#select-m-subSort").val($("#select-m-subSort-id").val());
	$(function(){
		/* 新建资讯的ajax表单提交 */
		$('#infoSubmitBtn').click(function() {
			$("#infoForm").ajaxSubmit({success : function(data) {
				alert($("#infoSubmitBtn").val()+"成功!");
				location.reload();
			}});
			return false;
		});
	});
</script>

<div
	class="generalbox_header overview_veryunevenlargecolumn_width generalbox_header_heavy">
	<div class="box_leftheader generalbox_leftheader">
		<img class="inlineicon transparentpng" height="16" alt=""
			src="<%=basePath%>/images/document.png" width="16" />
		<a href="javascript:void()" id="newsControl">资讯修改</a>
	</div>
	<div class="clearer"></div>
</div>
<div
	class="generalbox_body generalbox_background_white overview_veryunevenlargecolumn_width">
	<div class="singlecontent_block">
		<input type="hidden" id="select-m-subSort-id"
			value="${infoItem.infoSubSort.id }" />
		<form method="post" action="<%=basePath%>/info/updateInfo"
			id="infoForm">
			<table width="100%" cellpadding="2" cellspacing="1" border="0">
				<tr>
					<td width="12%" class="pn-flabel pn-flabel-h">
						栏目：
					</td>
					<td colspan="1" width="38%" class="pn-fcontent">
						${infoItem.infoSubSort.infoSort.name } ----
						<s:select list="infoSubSortList" headerKey="0"
							value="${infoItem.infoSubSort.name }" headerValue="二级栏目名称"
							listKey="id" listValue="name" name="infoItem.infoSubSort.id"
							theme="simple" id="select-m-subSort" />
					</td>
					<td width="12%" class="pn-flabel pn-flabel-h">
						店铺字号：
					</td>
					<td width="38%" class="pn-fcontent">
						<input type="text" size="30" name="infoItem.name"
							value="${infoItem.name }" />
					</td>
				</tr>
				<tr>
					<td width="12%" class="pn-flabel pn-flabel-h">
						人均消费：
					</td>
					<td width="38%" class="pn-fcontent">
						<input type="text" size="30" name="infoItem.per"
							value="${infoItem.per }" />
					</td>
					<td width="12%" class="pn-flabel pn-flabel-h">
						联系电话：
					</td>
					<td width="38%" class="pn-fcontent">
						<input type="text" size="30" name="infoItem.tel"
							value="${infoItem.tel }" />
					</td>
				</tr>
				<tr>
					<td width="12%" class="pn-flabel pn-flabel-h">
						显示标题：
					</td>
					<td width="38%" class="pn-fcontent">
						<input type="text" size="30" name="infoItem.title" />
					</td>
					<td width="12%" class="pn-flabel pn-flabel-h">
						详细地址：
					</td>
					<td width="88%" class="pn-fcontent">
						<input type="text" size="30" name="infoItem.address" />
					</td>
				</tr>
				<tr>
					<td width="12%" class="pn-flabel">
						介绍：
					</td>
					<td colspan="3" width="88%" class="pn-fcontent">
						<textarea class="xheditor-simple" name="infoItem.intro" rows="18"
							style="width: 592px">${infoItem.intro }</textarea>
					</td>
				</tr>
				<tr>
					<td width="12%" class="pn-flabel pn-flabel-h">
						发布时间：
					</td>
					<td colspan="1" width="38%" class="pn-fcontent">
						<input type="text" name="infoItem.created" size="30"
							value="${infoItem.created }" onfocus="WdatePicker()"
							class="Wdate" readonly="true" />
						<div class="pn-fhelp">
							不填写则为当前时间
						</div>
					</td>
					<td width="12%" class="pn-flabel pn-flabel-h">
						地图坐标：
					</td>
					<td colspan="1" width="38%" class="pn-fcontent">
						<input type="text" size="30" />
						<div class="pn-fhelp">
							XXX,XXX
						</div>
					</td>
				</tr>
				<tr>
					<td colspan="4" class="pn-fbutton">
						<input type="button" id="infoSubmitBtn" value="修改" />
						&nbsp;
						<input type="reset" value="重置" />
					</td>
				</tr>
				<input type="hidden" name="id" value="${infoItem.id }" />
			</table>
		</form>
	</div>
</div>
<br />
<br />